<?php 
include "session.php";
?>
<html>
  <head>

    <link href="themes/redmond/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
	<link href="Scripts/jtable/themes/lightcolor/red/jtable.css" rel="stylesheet" type="text/css" />
	
	<script src="scripts/jquery-1.6.4.min.js" type="text/javascript"></script>
    <script src="scripts/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
    <script src="Scripts/jtable/jquery.jtable.js" type="text/javascript"></script>
  </head>
  <body>
	<div id="PeopleTableContainer" style="width: 100%;"></div>
	<script type="text/javascript">

		$(document).ready(function () {

		    //Prepare jTable
			$('#PeopleTableContainer').jtable({
				title: 'Vulnerabilidades Dispositivos',
				paging: true,
				pageSize: 5,
				sorting: true,
				defaultSorting: 'dispositivo ASC',
				actions: {
					listAction: 'VulnerabilidadDispositivoActionsPagedSorted.php?action=list',
					createAction: 'VulnerabilidadDispositivoActionsPagedSorted.php?action=create',
					updateAction: 'VulnerabilidadDispositivoActionsPagedSorted.php?action=update',
					deleteAction: 'VulnerabilidadDispositivoActionsPagedSorted.php?action=delete'
				},
				fields: {
					id: {
						key: true,
						create: false,
						edit: false,
						list: false
					},
					dispositivo: {
						title: 'Dispositivo',
						width: '15%',
						options: 'listaDispositivos.php'
					},
					
					vulnerabilidad: {
						title: 'Vulnerabilidad',
						width: '15%',
						options: 'listaVulnerabilidades.php'
						
					},
					remediacion: {
						title: 'Remediación',
						width: '60%',
						type: 'textarea'
					},
					estado: {
						title: 'Estado',
						width: '10%',
						type: 'radiobutton',
						options: {1: "Abierta", 2: "Cerrada", 3: "Justificada"}
					}

				}
			});

			//Load person list from server
			$('#PeopleTableContainer').jtable('load');

		});

	</script>
 
  </body>
</html>
